package com.example.zz.example.pattern.composite;

/**
 * Describe:
 *
 * @author zhangzhuo18.
 * Date: 2024/6/20
 */
public class Leaf implements Component {
    private String name;

    public Leaf(String name) {
        this.name = name;
    }

    @Override
    public void operation() {
        System.out.println("Leaf " + name + " is operated.");
    }
}
